//
//  PAGView+Kingfisher.swift
//  JLUIKit
//
//  Created by Jiang Chencheng on 2024/8/14.
//

import UIKit
import libpag


public extension PAGView {
    
    func jl_setPag(with url: String) {
        setPathAsync(url) { [weak self] file in
            self?.play()
        }
    }
    
}


public extension PAGImageView {
    
    func jl_setPag(with url: String, placeholder: UIImage? = nil) {
        image = placeholder
        setPathAsync(url) { [weak self] file in
            self?.play()
        }
    }
    
}
